from milvus.milvus_op import MilvusOP
from milvus.utils import traverse_dir
from tqdm import tqdm

milvus_op = MilvusOP(db_name='state_vector_db', collection_name="hybrid3")
print('Inserting data ...')
path_iter = traverse_dir(path=r'../vec_db_data', tails=['pkl'])
for f_pth, f_name in tqdm(path_iter, desc='正在插入Milvus'):
    milvus_op.insert_data(f_pth)
print('Completed!.')
